
<h1><span class="yiyi-st" id="yiyi-15">Set routines</span></h1>
        <blockquote>
        <p>原文：<a href="https://docs.scipy.org/doc/numpy/reference/routines.set.html">https://docs.scipy.org/doc/numpy/reference/routines.set.html</a></p>
        <p>译者：<a href="https://github.com/wizardforcel">飞龙</a> <a href="http://usyiyi.cn/">UsyiyiCN</a></p>
        <p>校对：（虚位以待）</p>
        </blockquote>
    
<div class="section" id="making-proper-sets">
<h2><span class="yiyi-st" id="yiyi-16">Making proper sets</span></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%">
<col width="90%">
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-17"><a class="reference internal" href="generated/numpy.unique.html#numpy.unique" title="numpy.unique"><code class="xref py py-obj docutils literal"><span class="pre">unique</span></code></a>（ar [，return_index，return_inverse，...]）</span></td>
<td><span class="yiyi-st" id="yiyi-18">查找数组的唯一元素。</span></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="boolean-operations">
<h2><span class="yiyi-st" id="yiyi-19">Boolean operations</span></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%">
<col width="90%">
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-20"><a class="reference internal" href="generated/numpy.in1d.html#numpy.in1d" title="numpy.in1d"><code class="xref py py-obj docutils literal"><span class="pre">in1d</span></code></a>（ar1，ar2 [，assume_unique，invert]）</span></td>
<td><span class="yiyi-st" id="yiyi-21">测试1-D数组的每个元素是否也存在于第二个数组中。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-22"><a class="reference internal" href="generated/numpy.intersect1d.html#numpy.intersect1d" title="numpy.intersect1d"><code class="xref py py-obj docutils literal"><span class="pre">intersect1d</span></code></a>(ar1, ar2[, assume_unique])</span></td>
<td><span class="yiyi-st" id="yiyi-23">找到两个数组。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-24"><a class="reference internal" href="generated/numpy.setdiff1d.html#numpy.setdiff1d" title="numpy.setdiff1d"><code class="xref py py-obj docutils literal"><span class="pre">setdiff1d</span></code></a>（ar1，ar2 [，assume_unique]）</span></td>
<td><span class="yiyi-st" id="yiyi-25">找到两个数组的设置差。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-26"><a class="reference internal" href="generated/numpy.setxor1d.html#numpy.setxor1d" title="numpy.setxor1d"><code class="xref py py-obj docutils literal"><span class="pre">setxor1d</span></code></a>（ar1，ar2 [，assume_unique]）</span></td>
<td><span class="yiyi-st" id="yiyi-27">查找集的异或两个数组。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-28"><a class="reference internal" href="generated/numpy.union1d.html#numpy.union1d" title="numpy.union1d"><code class="xref py py-obj docutils literal"><span class="pre">union1d</span></code></a>（ar1，ar2）</span></td>
<td><span class="yiyi-st" id="yiyi-29">查找两个数组的并集。</span></td>
</tr>
</tbody>
</table>
</div>
